<h1 props={null}>What's happening?</h1>,
<h1>What's happening?</h1>
,
<h1 id="component">What's happening?</h1>
,
<h1 id="element">What's happening?</h1>
" /> <h1>What's happening?</h1>,
<h1 props={null}>What's happening?</h1>
,
<h1>What's happening?</h1>
,
<h1 id="component">What's happening?</h1>
,
<h1 id="element">What's happening?</h1>
" /> <h1 props={null}>What's happening?</h1>,
<h1>What's happening?</h1>
,
<h1 id="component">What's happening?</h1>
,
<h1 id="element">What's happening?</h1>
" />
Google News
logo
ReactJS - Quiz(MCQ)
What does this React element look like given the following function?

React.createElement('h1', null, "What's happening?");​
A)
<h1 props={null}>What's happening?</h1>
B)
<h1>What's happening?</h1>
C)
<h1 id="component">What's happening?</h1>
D)
<h1 id="element">What's happening?</h1>

Correct Answer :  

<h1>What's happening?</h1>